This page last changed on Aug 13, 2007 by cholmes.

Setup Tile Cached Super Overlays

The capabilities of this tutorial are still 'beta' and subject to change. Please let us know of any problems or suggestions for improvement

This tutorial is tarted for GeoServer 1.5.1 and above.
This tutorial assumes that GeoServer is running on http://localhost:8080/geoserver.

Getting Started

Overview

This tutorial walks you through the process of using an existing cache of tiles to enhance the performance of your superoverlays. Caching tiles allows Google Earth to only make the request for an image once, and after that can make use of the pre-generated image. This puts less strain on GeoServer and can lead to a very nice speed improvement. The best tool to cache tiles right now is TileCache, by Metacarta. It is written in Python and runs as a CGI. The downside of using TileCache is that it's another piece of infrastructure to set up. For the Google Summer of Code a student is working on JTileCache, which we hope will enable tight integration with GeoServer for extremely easy set up.

Configuring TileCache

  1. Install TileCache, instructions available here

After installing TileCache, you must configure your layer to be served. The one big downside of the current implementation in GeoServer is that the name of your layer in TileCache must be the same as the name of your layer in GeoServer, including the namespace prefix. For example, if you're layer is named 'topp:ny-img', then the layer config in tilecache.cfg would need to look like:

[topp:ny\-img]
type=WMSLayer
url=http://localhost:8080/geoserver/wms
layers=topp:ny-img
extension=png

Note that the 'layer grouping' functionality will give you a bit of flexibility with renaming layers, and it may be possible to tweak it to match an existing layer name in TileCache. And in the future we will work to make this mechanism more flexible.

Configuring GeoServer

  1. Navigate the GeoServer web ui to http://localhost:8080/geoserver/config/server.do (Config->Server from the home page)
  2. Set the Tile Cache parameter to the location of TileCache

You can set the TileCache parameter to an absolute location like "http://sigma.openplans.org/tilecache/tilecache.py?" or you can set it to a relative location like "tilecache/tilecache.py?". The latter will be interpreted as relative to the same host GeoServer is running on. Be sure that you have the latest version of TileCache installed, as there are a few incompatibilities in earlier versions. At this time you can only set one TileCache per GeoServer, in the future we will look in to making it configurable per layer.


tilecache.png (image/png)
Document generated by Confluence on Jan 16, 2008 23:28